<%@ page pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>学生登录</title>
    <link rel="stylesheet" href="/css/animate.css">
    <script src="/easyui/jquery.min.js"></script>
    <style>
        body{
            background-color: rgba(0,0,0,.5);
        }
        .modal{
            width: 600px;
            height: 300px;
            background-color: #fff;
            margin: 100px auto;
            padding-top: 30px;
            border: 1px solid #ddd;
            border-radius: 5px;
            text-align: center;
            font-size: 40px;
        }
        .modal input{
            width: 300px;
            height: 30px;
            border-radius: 5px;
        }
        .btn{
            display: block;
            width: 125px;
            height: 55px;
            line-height: 55px;
            margin: 50px auto;
            background-color: #0d3349;
            cursor: pointer;
            color: #fff;
            font-size: 30px;
            border-radius: 5px;
        }
    </style>
</head>
<body>

<div class="modal animated zoomInDown">
  
        学号：<input type="text" id="stuid">
    </label>
    <span class="btn" id="btn">签到</span>
</div>

</body>
<script>
    $(function () {
    	
        $("#btn").click(function () {
         	
            var stuId = $("#stuid").val();
            if (!(stuId)){
                alert("学号不能为空！！！");
            }else {
              
                $.ajax({
                    type: "post",
                    url: "/signin/insert",
                    data:  "stuId=" + stuId,
                    success: function (data) {
                      
                        if (data.success) {
                           
                            alert(data.msg);
                        } else {
                            alert(data.msg);
                        }
                    },
                    error: function (err) {
                        console.log(err);
                    }

                })
            }

        })
    });
</script>
</html>